<div id="content_header">
  <h3>Placement Test</h3>
</div>

<div class="row row-unstyled">
  <div class="col-md-12">
    <label>SEARCH</label>
  </div>
</div>

<div class="row">
  <div class="col-md-6">
    <form class="form-vertical">
      <div class="input-group">
        <input class="form-control" type="text" name="keyword" placeholder="Type Name to search" ng-model="searchText">
        <span class="input-group-addon">Find!</span>
      </div>
    </form>
  </div>
  <div class="col-md-6">
    <a ui-sref="^.new" class="btn btn-primary">Schedule a new placement test</a>
  </div>
</div>
<br>

<div class="row">
  <div class="col-md-12">
    <label>RESULTS</label>
    <div class="search-message">
      Found <span class="primary-color"><b>{{ pt.length }}</b></span> records
    </div>
  </div>
</div>

<ul class="pager">
  <li class="previous"><a href ng-click="dayMin()">&larr; Yesterday</a></li>
  <li ng-click="openDatepicker($event, 0)">
    <span ng-show="isToday"><a href>Today</a></span>
    <span ng-hide="isToday"><a href>{{ date | date:'mediumDate' }}</a></span>
  </li>
  <li class="next"><a href ng-click="dayPlus()">Next Day &rarr;</a></li>
</ul>
<div class="row">
  <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">

    <div class="form-group text-center">
      <div class="input-group">
        <input type="hidden" class="form-control" datepicker-popup="{{format}}" ng-model="timepicker.timeA" is-open="datePicker.isOpen[0]" max-date="'2015-06-22'" datepicker-options="dateOptions" ng-required="true" close-text="Close" ng-disabled="true" />
      </div>
    </div>
    <table class="table table-striped table-hover">
      <thead>
        <tr>
          <th>Student</th>
          <th>Schedule</th>
          <th>Payment Status</th>
          <th>Result</th>
        </tr>
      </thead>
      <tbody>
        <tr dir-paginate="item in pt | itemsPerPage: pagesize" total-items="totalItems">
          <td>
            <span class="dropdown">
              <a href class="dropdown-toggle">
                {{ item.Student.FullName }}
              </a>
              <ul class="dropdown-menu">
                <!-- <li role="presentation" class="dropdown-header">Action</li> -->
                <li><a href ng-really-message="Are you sure?" ng-really-click="delete('placement_tests', item.Id)">Delete Placement Test</a></li>
                <li><a href ui-sref="pt.show.edit({ id:item.Id })">Edit Placement Test</a></li>
              </ul>
            </span>
          </td>
          <td>On <small class="text-muted">{{ item.DateTime  | date: 'medium' }}</small></td>
          <td>
            <span class="label label-success" ng-if="item.Invoice.InvoiceStatus === 1">Paid</span>
            <span class="label label-danger" ng-if="item.Invoice.InvoiceStatus !== 1">Pending</span>
          </td>
          <td>
            <span class="label label-success" ng-if="item.CourseLevel">Passed</span>
            <span class="label label-warning" ng-if="!item.CourseLevel">Ongoing</span>
          </td>
        </tr>
      </tbody>
    </table>
    <dir-pagination-controls on-page-change="pageChanged(newPageNumber)" template-url="views/templates/dirPagination.tpl.html"></dir-pagination-controls>
  </div>
</div>